import { ChannelTypes } from '/imports/models/ChannelTypes';

Template.exploreNavsHeader.helpers({
  channelTypes: function() {
    const arr = [{name: 'all', display: '全部'}];
    ChannelTypes.find({}).map((item) => {
      arr.push(item);
    });
    return arr;
  },
  isActive: function(name) {
    if (!name) {
      return;
    }
    let pageName = Router.current().params.name;
    if (pageName == name) {
      return 'active';
    } else {
      return;
    }
  }
});